package cn.hm.config;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

import javax.jms.Message;

/**
 * @author Mxb
 * @version 1.0
 * @date 2020/8/1 11:43
 */
@Component
public class ReceiverConfig {
    @JmsListener(destination = "${boot-topic}")
    public void receiver1(Message message) {
        System.out.println(message);
        System.out.println("receiver1监听器触发，调用成功：" + Thread.currentThread().getName());
    }

    @JmsListener(destination = "${boot-topic}")
    public void receiver2(Message message) {
        System.out.println(message);
        System.out.println("receiver2监听器触发，调用成功：" + Thread.currentThread().getName());
    }

}
